initialize saved_value
authorTom Tromey <tromey@redhat.com>
Fri, 5 Jul 2013 01:48:59 +0000 (19:48 -0600)
committerTom Tromey <tromey@redhat.com>
Fri, 5 Jul 2013 01:48:59 +0000 (19:48 -0600)
initialize the saved_value field in all needed cases
also, add an assertion to do_one_unbind

src/eval.c

index 3f7be81a7e409810a64d1420dceb157b11599e4a..37ea81ba1cb629ce19d5ccc2cd139d596107c0cd 100644 (file)
@@ -3118,6 +3118,7 @@ specbind (Lisp_Object symbol, Lisp_Object value)
        specpdl_ptr->v.let.symbol = symbol;
        specpdl_ptr->v.let.old_value = ovalue;
        specpdl_ptr->v.let.where = Fcurrent_buffer ();
+       specpdl_ptr->v.let.saved_value = Qnil;
 
        eassert (sym->redirect != SYMBOL_LOCALIZED
                 || (EQ (SYMBOL_BLV (sym)->where, Fcurrent_buffer ())));
@@ -3184,6 +3185,7 @@ rebind_for_thread_switch (void)
 static void
 do_one_unbind (struct specbinding *this_binding, int unwinding)
 {
+  eassert (unwinding || this_binding->kind >= SPECPDL_LET);
   switch (this_binding->kind)
     {
     case SPECPDL_UNWIND: